"DESCRIPTION 1"="If you would like to start a program e.g. "MYAPP.exe" Windows first search the current WINDOWS and WINDOWS\SYSTEM folder for this file."
"DESCRIPTION 2"="If it's not found, Windows will continue to search for it in the %PATH% variable and if it's still not found, searches this list."
"DESCRIPTION 3"="If the EXE name is found, Windows will simply execute what you have configured, even if it's a total different file."
"DESCRIPTION 4"="Just edit the existing entries to your needs or add a new one, e.g. for some DOS tools you might have."
"COMMENT 1"=" "
"AUTHOR"="Xteq Systems"
"CONTACTURL"="http://www.xteq.com"
"COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
if ElementSubIndex>0 then 'OK, user has selected an item
Select Case ElementIndex
Case 1 'Edit existing one
sName=aryLoc(ElementSubIndex)
sPath=RegReadValue(sP & sName & sV1)
if len(sPath)=0 then
'oops, this one seems to use the PATH option
sPath=RegReadValue(sP & sName & sV2)
end if
sNew=InputWindow("Change EXE command for selected item (use a full path e.g. C:\TOOLS\mytool.exe)",sPath,1)
if IsEmpty(sNew)=false then
Call RegWriteValue(sP & sName & sV1,sNew,1)
Call MsgInformation("EXE command changed to " & sNew)
end if
Case 3 'DELETE
sName=aryLoc(ElementSubIndex)
Call RegDeleteValue(sP & sName & sV1)
Call RegDeletePath(sP & sName)
Call Plugin_Initialize()
Call MsgInformation("Item removed...")
End Select
else
Call MsgWarning("No item selected - please select an item first.")
end if
end if
END SUB
'Called when the Plugin is about to be removed from memory
SUB Plugin_Terminate
END SUB
Sub Blah
If a=1 then
s=sp & aryLoc(ElementSubIndex) & sV1
sV=RegReadValue(s)
if true then
'change it!
Call RegWriteValue(s,sV,1)
Call SetUIElement(ElementSubIndex,sV)
end if
else
if ElementIndex=3 then 'Delete!!
'Create name of first value
t=sp & aryLoc(ElementSubIndex) ' "& sV1" removed here, and 's' renamed to 't'
' Start of new code added by Neil Turner <totalxs@hotmail.com>
iCount=RegEnumValues(t) ' Enumerate all values
For u=1 to iCount
s=RegEnumElement(u) ' Get one of the values...
s=t & "\" & s ' Get full path of value...
Call RegDeleteValue(s) ' ... and delete it!
Next
If IsEmpty(t & "\@")=true then
Call RegDeletePath(t) ' Finally, delete key!
else
If IsEmpty(t & "\@")=true then
Call RegDeleteValue(t & "\@") ' Otherwise, remove (Default) and then delete key. IsEmpty test is carried out twice - otherwise X-Setup produces an error (don't know why).
end if
Call RegDeletePath(t)
end if
' End of new code
'Set item to empty so it is removed from the list...